<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::get('test', 'Api\IndexController@test')->name('test');
Route::get('download', 'Api\IndexController@download')->name('download');
//支付
Route::post('payment/wechatTransfer', 'PaymentController@wechatTransfer')->name('payment.wechatTransfer'); //企业付款
Route::get('payment/wechat', 'PaymentController@payByWechat')->name('payment.wechat'); //微信支付
Route::post('payment/wechat/notify', 'PaymentController@wechatNotify')->name('payment.wechat.notify'); //微信回调

//注册
Route::group(['namespace' => 'Home'], function () {
    Route::get('app/download', 'CommonController@download')->name('download');
    Route::post('/wang_upload', 'CommonController@wang_upload')->name('wang_upload');
    // Route::post('/customer', 'CommonController@customer')->name('customer')->middleware('auth.api');


    Route::get('/policy', 'ProController@policy')->name('policy');
    Route::get('/service', 'ProController@service')->name('service');
    Route::get('/usepage', 'ProController@usepage')->name('usepage');

    //注册
    Route::get('/register', 'RegisterController@register')->name('register');
    Route::get('/register/{code}', 'RegisterController@register');
    Route::post('/register_make', 'RegisterController@register_make')->name('register_make');
    Route::post('/send_code', 'RegisterController@send_code');

    //交易
    Route::get('/buy', 'SaleController@buy')->name('buy');
    Route::get('/buy/{id}', 'SaleController@buy')->name('buy');
    Route::get('/buyandsellList', 'SaleController@buyandsellList')->name('buyandsellList');
    Route::get('/buyandsellList/{id}/', 'SaleController@buyandsellList')->name('buyandsellList');
    Route::get('/quotation', 'SaleController@quotation')->name('quotation');
    Route::get('/quotation/{token}', 'SaleController@quotation')->name('quotation');
    Route::get('/sell', 'SaleController@sell')->name('sell');
    Route::get('/transaction', 'SaleController@transaction')->name('transaction');



});


